/* ==========================================================
   ESTILOS PARA O SISTEMA DE ALERTAS WHATSAPP - VERSÃO SIMPLIFICADA
   ========================================================== */

/* 1. BOTÃO FLUTUANTE DO WHATSAPP */
/* Por padrão, a bolha fica oculta e só aparece na HOME (page-home) */
.whatsapp-float {
    position: fixed;
    bottom: 30px; /* Posicionado embaixo */
    right: 30px;
    z-index: 9998;
    display: none !important;
}

/* Exibe a bolha SOMENTE quando o body indicar que estamos na home */
body[data-current-page="page-home"] #whatsapp-float-button.whatsapp-float {
    display: block !important;
}

.whatsapp-button {
    background: #25D366; /* Verde WhatsApp */
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* 2. BADGE DE NOTIFICAÇÕES (BOLINHA VERMELHA) */
.whatsapp-badge-alert {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30; /* Vermelho */
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

/* 3. ANIMAÇÃO DE PULSO (PARA ALERTAS CRÍTICOS) */
@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-button.pulse {
    animation: pulse-whatsapp 2s infinite;
}

/* 4. FUNDO ESCURO QUANDO ABRIR O PAINEL */
#whatsapp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 5. PAINEL DE CONTROLE (MODAL) */
#whatsapp-painel {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    font-family: 'Inter', sans-serif;
}

/* 6. BOTÕES DENTRO DO PAINEL */
.whatsapp-action-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
}

.whatsapp-action-btn:hover {
    background: #128C7E;
}

/* 7. TOGGLE SWITCH (LIGA/DESLIGA) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #25D366;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 8. RESPONSIVIDADE PARA CELULAR */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-button {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}